import { ApiTags } from '@nestjs/swagger/dist/decorators';
import { Controller, Get, Post, Body, Patch, Param, Delete, Query } from '@nestjs/common';
import { VipServiceService } from './vip-service.service';
import { CreateVipServiceDto } from './dto/create-vip-service.dto';
import { UpdateVipServiceDto } from './dto/update-vip-service.dto';

@ApiTags('VIP服务')
@Controller('vipservice')
export class VipServiceController {
  constructor(private readonly vipServiceService: VipServiceService) {}

  @Post()
  create(@Body() createVipServiceDto: CreateVipServiceDto) {
    return this.vipServiceService.create(createVipServiceDto);
  }

  @Get()
  findAll() {
    return this.vipServiceService.findAll();
  }

  @Get('page')
  async findPage(@Query() query: any) {
    return await this.vipServiceService.findPage(query)
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.vipServiceService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateVipServiceDto: UpdateVipServiceDto) {
    return this.vipServiceService.update(id, updateVipServiceDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.vipServiceService.remove(id);
  }

  @Post('delMany')
  manyRemove(@Body() body: string[]) {
    return this.vipServiceService.manyRemove(body)
  }
}
